#include <iostream>

using namespace std;

int main()
{
	//freopen("input.txt", "r", stdin);

	int cx, cy, n, x, y;

	while(cin >> cx >> cy >> n)
	{
		x = y = 0;
		while(1)
		{
			cout << "fill A" << endl;

			x = cx;

			if(x == n)
			{
				cout << "success" << endl;
				break;
			}

			while(x > 0)
			{
				cout << "pour A B" << endl;

				if(cy - y >= x)
				{
					y += x;
					x = 0;
				}
				else
				{
					x -= (cy - y);
					y = cy;
				}

				if(x == n || y == n)
					break;

				if(y == cy)
				{
					cout << "empty B" << endl;
					y = 0;
				}
			}

			if(x == n || y == n)
			{
				cout << "success" << endl;
				break;
			}
		}
	}
}